import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: "/login",
      name: "login",
      component: () => import("views/frame/Login.vue"),
    },
    {
      path: "/home",
      name: "home",
      component: () => import("views/frame/Home.vue"),
      children: [
        // 资源管理模块
        {
          //资源导入
          path: "/srcmanageList",
          name: "srcmanageList",
          component: () => import("views/card/srcmanage/srcmanage_list.vue"),
        },
        {
          //mca管理
          path: "/mcaList",
          name: "mcaList",
          component: () => import("views/card/srcmanage/mca_list.vue"),
        },
        {
          //iccid查询
          path: "/iccidList",
          name: "iccidList",
          component: () => import("views/card/srcmanage/iccid_list.vue"),
        },
        {
          //iccid查询
          path: "/operateFile",
          name: "operateFile",
          component: () => import("views/card/srcmanage/operateFile_list.vue"),
        },
        //任务管理
        {
          path: "/taskList",
          name: "taskList",
          component: () => import("views/card/task/task_list.vue"),
        },
        // =================以下是安全芯片生产下单系统的路由============================================
        {
          path: "/factoryList",
          name: "factoryList", //工厂
          component: () => import("views/bill/factory/factory_list.vue"),
        },
        {
          path: "/cardfaceList",
          name: "cardfaceList", //版面
          component: () => import("views/bill/cardface/cardface_list.vue"),
        },
        {
          path: "/chipList",
          name: "chipList", //芯片
          component: () => import("views/bill/chip/chip_list.vue"),
        },
        {
          path: "/packstandardList",
          name: "packstandardList", //芯片
          component: () =>
            import("views/bill/packstandard/packstandard_list.vue"),
        },
        {
          path: "/productCategoryList",
          name: "productCategoryList", //产品大类
          component: () =>
            import("views/bill/productCategory/productCategory_list.vue"),
        },
        {
          path: "/productList",
          name: "productList", //产品
          component: () => import("views/bill/product/product_list.vue"),
        },
        {
          path: "/orderList",
          name: "orderList", //产品
          component: () => import("views/bill/order/order_list.vue"),
        },

        // 以下没用
        {
          path: "/writecard",
          name: "writecard",
          component: () => import("views/card/writecard.vue"),
        },
        {
          path: "/tasksubdetail",
          name: "tasksubdetail",
          component: () => import("views/card/task/tasksub_list.vue"),
        },
        {
          path: "/writelog",
          name: "writelog",
          component: () => import("views/card/writelog_list.vue"),
        },
        {
          path: "/imsidetail",
          name: "imsidetail",
          component: () => import("views/card/imsidetail.vue"),
        },
        {
          path: "/blanckcardmonitor",
          name: "blanckcardmonitor",
          component: () => import("views/card/blankcardmonitor.vue"),
        },
        {
          path: "/cardface",
          name: "cardface",
          component: () => import("views/card/bdm/cardface_list.vue"),
        },
        {
          path: "/dllversion",
          name: "dllversion",
          component: () => import("views/card/bdm/dllversion_list.vue"),
        },
        {
          path: "/sp",
          name: "sp",
          component: () => import("views/card/bdm/sp_list.vue"),
        },
        {
          path: "/cardspecies",
          name: "cardspecies",
          component: () => import("views/card/bdm/cardspecies_list.vue"),
        },
        {
          path: "/smscenter",
          name: "smscenter",
          component: () => import("views/card/bdm/smscenter_list.vue"),
        },

        // {
        //   path: '/applybatch',
        //   name: 'applybatch',
        //   component: () => import('views/card/mcm/applybatch_list.vue'),
        // },
        {
          path: "/filedownload",
          name: "filedownload",
          component: () => import("views/card/mcm/filedownload_list.vue"),
        },
        {
          path: "/formatfile",
          name: "formatfile",
          component: () => import("views/card/mcm/formatfile.vue"),
        },
        {
          path: "/realtimeopera",
          name: "realtimeopera",
          component: () => import("views/card/mcm/realtimeopera.vue"),
        },
        {
          path: "/updatePassword",
          name: "updatePassword",
          component: () => import("views/frame/UpdatePassword.vue"),
        },
        {
          path: "/dashboard",
          name: "dashboard",
          component: () => import("views/frame/dashboard.vue"),
        },
        // 用户权限
        {
          path: "/amsmodelList",
          name: "amsmodelList",
          component: () => import("views/uim/ams/amsmodel_list.vue"), //模块管理
        },
        {
          path: "/amsroleList",
          name: "amsroleList",
          component: () => import("views/uim/ams/amsrole_list.vue"), //角色管理
        },
        {
          path: "/amsroleDetail",
          name: "amsroleDetail",
          component: () => import("views/uim/ams/amsrole_upd.vue"), //角色管理详情页
        },
        {
          path: "/amsuserList",
          name: "amsuserList",
          component: () => import("views/uim/ams/amsuser_list.vue"), //用戶管理
        },
        {
          path: "/amsuserDetail",
          name: "amsuserDetail",
          component: () => import("views/uim/ams/amsuser_upd.vue"), //用戶管理详情页
        },
        {
          path: "/amsuserSelf",
          name: "amsuserSelf",
          component: () => import("views/uim/ams/amsuser_self.vue"), //个人信息
        },
        //=========TSM 综合类========================
        {
          path: "/ctrlparamsList",
          name: "ctrlparamsList",
          component: () => import("views/tsm/sys/ctrlparams_list.vue"),
        }, //预警设置
      ],
    },
    {
      path: "/404",
      component: (resolve) => require(["components/page/404.vue"], resolve),
    },
    {
      path: "*",
      redirect: "/404",
    },
  ],
});
